Lesson: 15 - CONDITIONAL STATEMENT – If-then else - 2

Purpose : Teach relative orientation and procedural operations. Students will learn repeated conditions.

Materials Required

Computer, Scratch 3.0 and blockly games.

Curriculum Content 5.5) Conditional statements.

Prior knowledge

Students should know about directions (Left, Right, forward and backward), Simple if.

Exercises

Exercise:1



  1. Add three sprites (One person, chick and rabbit). Chick and rabbit are going to have a running race from one end of the stage to the other end. The person sprite asks the question "Who should win the race?". If the user chooses a chick, the chick should move faster than the rabbit and be the winner. Otherwise, the rabbit should move faster than the chick and be the winner. Write a scratch code to do this.


Exercise Video



  1. See the video for your reference.

Optional



Exercise:2



  1. (Blockly Maze - Level 9) How will the person reach the goal?


Exercise:3



  1. (Blockly Maze - Level 10) How will the person reach the goal?

Solutions



  • Click here to view the sb3 file to complete the exercise-1.
  • Click here to view the solution for exercise-2.
  • Click here to view the solution for exercise-3.

  • Teacher's Instruction
    1. The Blockly Maze activities are optional. Children can play for all long as they are interested and have time.
    2. Teachers can initially help the students to complete these levels, if required.
    3. In exercise 1 (i.e. race) ask the children to think about how the race will end. Possibilities are (a) when a sprite crosses X=300. (b) a fourth finish line sprite and when a sprite touches the finish line. Other options are also possible. Also how does one stop everything with a message when the race ends.
    4. Points to Ponder: There are many maze puzzles where you enter through one door and have to exit through another. There are also real-life mazes in many places with hedges grown above the height of a human. I.e. You cannot see the full maze. What is a strategy to solve such mazes. Keep to the left or keep to the right is one good strategy. Ask children to think about that and validate it in some maze games! Observe that this is the strategy we used to solve Maze Level 10.